package org.tech4j.captcha.character.factory;

import org.tech4j.captcha.character.provider.CaptchaProvider;
import org.tech4j.captcha.character.provider.Tech4JCaptchaProvider;
import org.tech4j.common.spi.ExtensionLoader;

/**
 * @program: tech4j
 * @description:
 * @author: YuKai Fan
 * @create: 2025/3/4 15:59
 **/
public class CaptchaProviderFactory {
    private CaptchaProviderFactory() {

    }

    public static CaptchaProvider newInstance(String name) {
        return ExtensionLoader.getExtensionLoader(CaptchaProvider.class).getJoin(name);
    }

    public static CaptchaProvider newInstance() {
        return new Tech4JCaptchaProvider();
    }
}
